package com.shisfish.library.Impl;

import java.util.List;
import java.util.Map;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IAdminInter;
import com.shisfish.library.Model.Admin;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class AdminImpl implements IAdminInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	private IAdminInter mapper = (IAdminInter) ac.getBean("adminMapper");
	
	@Override
	public int insertOne(Admin t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<Admin> list) {
		// TODO Auto-generated method stub
		return mapper.insertAll(list);
	}

	@Override
	public int updateOne(Admin t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<Admin> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Admin> selectById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Admin> selectByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.selectByKey(key);
	}

	@Override
	public List<Admin> selectAll() {
		// TODO Auto-generated method stub
		return mapper.selectAll();
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return mapper.countAll();
	}

	@Override
	public List<Admin> selectAllPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectAllPage(currentPage, pageSize);
	}

	@Override
	public List<Admin> selectByUserId(String userId) {
		// TODO Auto-generated method stub
		return mapper.selectByUserId(userId);
	}

	@Override
	public List<Map<String, Object>> selectUserId(String userId) {
		// TODO Auto-generated method stub
		return mapper.selectUserId(userId);
	}

}
